# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-tomlkit
_realname=tomlkit
pkgver=0.12.3
pkgrel=1
pkgdesc="Style-preserving TOML library for Python"
url="https://github.com/sdispater/tomlkit"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-installer py3-poetry-core"
checkdepends="py3-pytest py3-yaml"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_realname:0:1}/$_realname/$_realname-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/tomlkit-$pkgver-py3-none-any.whl
}

sha512sums="
f89b1fdcbefcd511bbc5e22a1cc57d8c4593fc1353e901de31c69ac99ed3c685f042d71205c747bd5d20df246dd19b5402393df81231f12d18414d85c0a0000c  tomlkit-0.12.3.tar.gz
"
